let socket;
const WS_LINK = `ws://${IP}:8084/websocket/9001`;
if (typeof (WebSocket) == "undefined") {
    console.log("您的浏览器不支持WebSocket");
} else {
    socket = new WebSocket(WS_LINK);

    socket.onopen = function () {
        console.log("Socket 已打开");
    };

    socket.onmessage = function (msg) {
        let data = JSON.parse(msg.data);
        verifyTimingHandler(data)
    };

    socket.onclose = function () {
        console.log("Socket已关闭");
    };

    socket.onerror = function () {
        alert("Socket发生了错误");
    }
}